package cn.silver.module.message.domain;

import cn.silver.framework.core.utils.DateUtils;
import cn.silver.framework.mybatis.annotation.Table;
import cn.silver.framework.mybatis.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.util.Date;

/**
 * @author zhouxiaobo
 */
@Data
@NoArgsConstructor
@Table(name = "msg_message_attatch")
@EqualsAndHashCode(callSuper = true)
@Schema(name = "MsgMessageAttatch", title = "系统消息通知-消息附件表")
public class MsgMessageAttatch extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;
    /**
     * 消息ID
     */
    @Schema(title = "消息ID")
    private String messageId;
    /**
     * 附件ID
     */
    @Schema(title = "附件ID")
    private String attachId;
    /**
     * 附件名称
     */
    @Schema(title = "附件名称")
    private String attachName;
    /**
     * 附件路径
     */
    @Schema(title = "附件路径")
    private String attachPath;
    /**
     * 附件上下文类型
     */
    @Schema(title = "附件上下文类型")
    private String attachType;
    /**
     * 文件大小
     */
    @Schema(title = "文件大小")
    private Integer attachSize;
    /**
     * 创建者
     */
    @Schema(title = "创建者")
    private String uploadBy;
    /**
     * 创建者名称
     */
    @Schema(title = "创建者名称")
    private String uploadName;
    /**
     * 上传时间
     */
    @Schema(title = "上传时间")
    @JsonFormat(timezone = DateUtils.TIME_ZONE, pattern = DateUtils.YYYY_MM_DD_HH_MM_SS)
    private Date uploadTime;
}
